

Array.prototype.myFill2 = function (value, start = 0, end = this.length) {

    for (let i = start; i < end; i ++) {
        this[i] = value
    }
    return this
}

const arr = [1, 2, 3, 10, 22, 6, 7]
console.log(arr.myFill2(1));
